﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %>
<%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments" TagPrefix="chartfxadornments" %>
<%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Car2013r.aspx.cs" Inherits="Updms.Car.Car2013r" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>▒ UPDMS [Car2013r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->
		</td>
	</tr>
	<tr>
		<td id="menu_area">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Car2013r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_layout" Text="레이아웃" runat="server" /></td>
					<td class="ctl" width="22%"><asp:RadioButtonList id="rbl_layout" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" CssClass="rbl_flow"></asp:RadioButtonList></td>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_search_car_id" Text="차량" runat="server" /></td>
					<td class="ctl" width="22%"><asp:dropdownlist id="ddl_search_car_id" runat="server" CssClass="ddl"></asp:dropdownlist></td>
					<td class="lbl" width="11%"><asp:Literal ID="ltr_search_base_ym" Text="기준년월" runat="server" /></td>
					<td class="ctl" width="22%">
						<ul class="horizontal">
							<li style="width:59%;"><asp:DropDownList id="ddl_search_base_year" runat="server" CssClass="ddl"></asp:DropDownList></li>
							<li style="width:41%;"><asp:dropdownlist id="ddl_search_base_month" runat="server" CssClass="ddl">
										<asp:ListItem Value="01">01</asp:ListItem>
										<asp:ListItem Value="02">02</asp:ListItem>
										<asp:ListItem Value="03">03</asp:ListItem>
										<asp:ListItem Value="04">04</asp:ListItem>
										<asp:ListItem Value="05">05</asp:ListItem>
										<asp:ListItem Value="06">06</asp:ListItem>
										<asp:ListItem Value="07">07</asp:ListItem>
										<asp:ListItem Value="08">08</asp:ListItem>
										<asp:ListItem Value="09">09</asp:ListItem>
										<asp:ListItem Value="10">10</asp:ListItem>
										<asp:ListItem Value="11">11</asp:ListItem>
										<asp:ListItem Value="12">12</asp:ListItem>
									</asp:dropdownlist></li>
						</ul>
					</td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<!-- 디테일1 시작 -->
			<!-- 디테일1 끝 -->
			<!-- 리스트셋 시작 -->
			<table id="table_list_set" cellspacing="0" cellpadding="0" width="100%" border="0" runat="server">
				<tr>
					<td align="center">
						<!-- 월별 시작 -->
						<table id="table_monthly" cellspacing="0" cellpadding="0" width="100%" border="0" runat="server">
							<tr>
								<td align="center">
									<table class="control">
										<tr>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_prev_month" ToolTip="전월" runat="server" OnClick="ibtn_prev_month_Click"><img src="../Common/Images/arrow_rect_left.gif" alt="전월" /></asp:linkbutton></td>
											<td style="padding:1px;"><asp:Label ID="lbl_this_month" CssClass="sub_title" runat="server" /></td>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_this_month" ToolTip="당월" runat="server" OnClick="ibtn_this_month_Click"><img src="../Common/Images/control_rect_stop.gif" alt="당월" /></asp:linkbutton></td>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_next_month" ToolTip="차월" runat="server" OnClick="ibtn_next_month_Click"><img src="../Common/Images/arrow_rect_right.gif" alt="차월" /></asp:linkbutton></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td>
                                    <div class="div_left" style="margin:2px 0 0 0;"><asp:checkbox id="cb_scroll_enabled" runat="server" Checked="false" ToolTip="Scroll Enabled"></asp:checkbox></div>
                                    <table cellspacing="0" cellpadding="0" border="0" style="width:380px;" class="div_right">
										<tr>
											<td style="width:20%;"><span class="sicon_refuelling"></span>&nbsp;<asp:Literal ID="ltr_refuelling_m" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_service"></span>&nbsp;<asp:Literal ID="ltr_service_m" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_traffic"></span>&nbsp;<asp:Literal ID="ltr_traffic_m" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_washing"></span>&nbsp;<asp:Literal ID="ltr_washing" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_total"></span>&nbsp;<asp:Literal ID="ltr_total_m" runat="server"></asp:Literal></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td valign="top">						
									<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound">
										<Columns>
											<asp:BoundField DataField="Sun" HeaderText="일" HtmlEncode="False" HeaderStyle-ForeColor="Red">
												<ItemStyle HorizontalAlign="Left" Width="15%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Mon" HeaderText="월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="14%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Tue" HeaderText="화" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="14%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Wed" HeaderText="수" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="14%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Thu" HeaderText="목" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="14%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Fri" HeaderText="금" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="14%" CssClass="v_align_t" />
											</asp:BoundField>
											<asp:BoundField DataField="Sat" HeaderText="토" HtmlEncode="False" HeaderStyle-ForeColor="Blue">
												<ItemStyle HorizontalAlign="Left" Width="15%" CssClass="v_align_t" />
											</asp:BoundField>
										</Columns>
									</asp:GridView>
								</td>
							</tr>
						</table>
						<!-- 월별 끝 -->
						<!-- 년도별 시작 -->
						<table id="table_yearly" cellspacing="0" cellpadding="0" width="100%" border="0" runat="server">
							<tr>
								<td align="center">
									<table>
										<tr>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_prev_year" ToolTip="전년" runat="server" OnClick="ibtn_prev_year_Click"><img src="../Common/Images/arrow_rect_left.gif" alt="전년" /></asp:linkbutton></td>
											<td style="padding:1px;"><asp:Label ID="lbl_this_year" CssClass="sub_title" runat="server" /></td>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_this_year" ToolTip="당년" runat="server" OnClick="ibtn_this_year_Click"><img src="../Common/Images/control_rect_stop.gif" alt="당년" /></asp:linkbutton></td>
											<td style="padding:1px;"><asp:linkbutton id="ibtn_next_year" ToolTip="차년" runat="server" OnClick="ibtn_next_year_Click"><img src="../Common/Images/arrow_rect_right.gif" alt="차년" /></asp:linkbutton></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td align="left">
									<table cellspacing="0" cellpadding="2" border="0" style="width:380px;">
										<tr>
											<td style="width:20%;"><span class="sicon_refuelling"></span>&nbsp;<asp:Literal ID="ltr_refuelling_y" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_service"></span>&nbsp;<asp:Literal ID="ltr_service_y" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_traffic"></span>&nbsp;<asp:Literal ID="ltr_traffic_y" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_washing"></span>&nbsp;<asp:Literal ID="ltr_washing_y" runat="server"></asp:Literal></td>
											<td style="width:20%;"><span class="sicon_total"></span>&nbsp;<asp:Literal ID="ltr_total_y" runat="server"></asp:Literal></td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td>								
									<asp:GridView ID="GridView3" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView3_RowDataBound" ShowFooter="True">
										<Columns>
											<asp:BoundField DataField="Div_Nm" HeaderText="구분" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" Width="9%" />
											</asp:BoundField>
											<asp:BoundField DataField="M01" HeaderText="1월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M02" HeaderText="2월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M03" HeaderText="3월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M04" HeaderText="4월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M05" HeaderText="5월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M06" HeaderText="6월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M07" HeaderText="7월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M08" HeaderText="8월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M09" HeaderText="9월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M10" HeaderText="10월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M11" HeaderText="11월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M12" HeaderText="12월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="Total_Amt" HeaderText="총액" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Right" Width="7%" />
											</asp:BoundField>
										</Columns>
									</asp:GridView>
								</td>
							</tr>
							<tr>
								<td style="height:10px"></td>
							</tr>
							<tr>
								<td>								
									<asp:GridView ID="GridView2" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView2_RowDataBound">
										<Columns>
											<asp:BoundField HeaderText="일">
												<ItemStyle HorizontalAlign="Center" Width="9%" />
											</asp:BoundField>
											<asp:BoundField DataField="M01" HeaderText="1월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M02" HeaderText="2월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M03" HeaderText="3월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M04" HeaderText="4월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M05" HeaderText="5월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M06" HeaderText="6월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M07" HeaderText="7월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M08" HeaderText="8월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M09" HeaderText="9월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M10" HeaderText="10월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M11" HeaderText="11월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField DataField="M12" HeaderText="12월" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
											<asp:BoundField HeaderText="" HtmlEncode="False">
												<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="7%" />
											</asp:BoundField>
										</Columns>
									</asp:GridView>
								</td>
							</tr>
						</table>
						<!-- 년도별 끝 -->						
					</td>
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			<!-- 모달영역(라인챠트) 시작 -->
			<asp:Panel ID="Panel1" style="display:none;" runat="server">
				<div class="div_box">
				<img id="img_close" src="../Common/Images/close.gif" class="hand" style="float:right;" onclick="hideChartByDiv();" alt="닫기" /><br />
				<chartfx7:chart id="chart_line" runat="server" height="200px" width="1000px" Palette="ChartFX6.ChartFX6" ImageSettings-Interactive="False">
					<AxisY Title-Text="금액 (원)">
					<Grids Major-Style="Dash" Interlaced="True"></Grids>
						<LabelsFormat CustomFormat="###,###,##0" />
					</AxisY>

					<AxisX Title-Text="">
					<Grids Major-Visible="False"></Grids>
					</AxisX>

					<AllSeries PointLabels-Visible="True"></AllSeries>

					<LegendBox ContentLayout="Near" Dock="Bottom"></LegendBox>

					<MainPane AxisY-Title-Text="금액 (원)"></MainPane>
					<SpecialObjects>
						<chartfxadornments:SimpleBorder AssemblyName="ChartFX.WebForms.Adornments" Color="Transparent"
							Type="None">
						</chartfxadornments:SimpleBorder>
						<chartfxadornments:GradientBackground AssemblyName="ChartFX.WebForms.Adornments"
							ColorFrom="Transparent" EffectArea="0">
						</chartfxadornments:GradientBackground>
					</SpecialObjects>
				<Series>
					<chartfx7:SeriesAttributes />
				</Series>
				</chartfx7:chart>
				</div>
			</asp:Panel>
			<!-- 모달영역(라인챠트) 끝 -->
			<!-- 설명 시작 -->
			<!-- 설명 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
				<input type="hidden" id="h_row_idx" name="h_row_idx" value="" runat="server" />
				<asp:LinkButton ID="lbtn_set_chart" OnClick="lbtn_set_chart_Click" runat="server" />
			</div>
			<!-- 히든값 끝 -->
			<act:ModalPopupExtender ID="mpe_chart_line" runat="server"
				BehaviorID="mpe_chart_line_b"
				TargetControlID="lbtn_set_chart"
				PopupControlID="Panel1"
				CancelControlID="img_close"
				BackgroundCssClass="modalBackground" />
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>

<script language="javascript" type="text/javascript" defer="defer">
	//구분별 챠트
	function viewChartByDiv(idx) {
		$("h_row_idx").value = idx;
		__doPostBack('lbtn_set_chart', '');
	}

	//챠트 숨기기
	function hideChartByDiv() {
		var mpeBehavior = $find('mpe_chart_line_b');
		mpeBehavior.hide();
	}

	/* This is high-level function. */
	function handle(delta, evt) {
		if ($("GridView1") != null) {
			var tableMinX = getPosX("GridView1");
			var tableMaxX = tableMinX + $("GridView1").offsetWidth;
			var tableMinY = getPosY("GridView1");
			var tableMaxY = tableMinY + $("GridView1").offsetHeight;
			var eventX = isIE() ? window.event.x : evt.clientX;
			var eventY = isIE() ? window.event.y : evt.clientY;

			if ($("cb_scroll_enabled").checked) {
			    if (tableMinX < eventX && tableMaxX > eventX && tableMinY < eventY && tableMaxY > eventY) {
			        if (delta < 0) {
			            //휠다운(차월)
			            if ($("ibtn_next_month") != null && !$("ibtn_next_month").disabled) {
			                __doPostBack("ibtn_next_month", "");
			            }
			        } else {
			            //휠업(전월)
			            if ($("ibtn_prev_month") != null && !$("ibtn_prev_month").disabled) {
			                __doPostBack("ibtn_prev_month", "");
			            }
			        }
			    }
			}
		}
	}

	/* Event handler for mouse wheel event. */
	function wheel(event) {
		var delta = 0;
		if (!event) event = window.event;
		if (event.wheelDelta) {
			delta = event.wheelDelta / 120;
			if (window.opera) delta = -delta;
		} else if (event.detail) delta = -event.detail / 3;
		if (delta) handle(delta, event);
	}

	/* Initialization code. */
	if (window.addEventListener) {
		window.addEventListener('DOMMouseScroll', wheel, false);
	}
	window.onmousewheel = document.onmousewheel = wheel;

</script>
</body>
</html>